import { post } from '../api-caller';
import { MeRichInfo } from '../me.types';

const sendVcode = async (phone: string) => {
  await post({ path: '/api/auth/login/vcode', body: { phone } });
};

const login = (options: { phone: string; password: string; vcode: string }) =>
  post<MeRichInfo>({ path: '/api/auth/login', body: options });

const loginApis = {
  sendVcode,
  login,
};

export default loginApis;
